# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=libzapojit
pkgver=0.0.3+11+g840627d
pkgrel=2
pkgdesc="GLib/GObject wrapper for the SkyDrive and Hotmail REST APIs"
url="https://wiki.gnome.org/Projects/Zapojit"
arch=(i686 x86_64)
license=(GPL)
depends=(libsoup gnome-online-accounts)
makedepends=(intltool gobject-introspection gnome-common git gtk-doc)
_commit=840627d582534dafff7e05c090fb6e1a65ed2199  # master
source=("git+https://git.gnome.org/browse/libzapojit#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --disable-static --enable-gtk-doc
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}
